decorative banner

Creating expressions manually


    Expressions are based on the standard JavaScript language; but you do not need to know JavaScript to use expressions. You can create expressions by using simple examples and modifying them to suit your needs or by chaining objects and methods together using the expression elements guide or language menu. So, even if you have no previous experience with JavaScript, you can use expressions to create complex animations that would otherwise require you to generate numerous keyframes. And if you have a basic understanding of JavaScript, you can write expressions that create sophisticated relationships between layer properties.

    For information on writing your own expressions, see Using the Expression language menu and After Effects expression elements guide.

    TipTo learn about shortcuts for creating expressions, see the Shortcuts Appendix.

To create an expression:

  1. Select a property in the Timeline window and choose Animation > Add Expression.
  2. Note: After Effects automatically fills the expression field with a default expression that copies the fixed value of the property or the value of the keyframes (if any).

  3. Do one of the following:
    • Drag the pick whip expression pick whip to a property in the Timeline window, or to an effect property in the Effect Controls window. If you want, modify the pick whip results.
    • Type an expression directly over the existing text. If you want, use the Expression language menu or the elements guide for help with entering properties, functions, and constants.
  4. Click outside of the expression field or press Enter on the numeric keypad to activate the expression.
  5. Note: If an expression cannot be processed, After Effects displays a message explaining the error and automatically disables the expression. A yellow warning icon 8 bit warning icon: appears next to the expression; click the warning icon to view the error message again.

To temporarily turn an expression off:

  1. Click the On/Off switch expression On/Off switch next to the layer property name on which the expression is written. When an expression is off, a slash appears through the switch expression switch off icon.
  2. Click the switch again to turn the expression back on.

To view all of the expressions on selected layers:

    Press EE on the keyboard.